/*
 * AbstractDAO<T>.java
 * 
 * Versao: 1.0.0
 *
 * Data: 06/04/2011
 *
 * Copyright (C) 2011
 * wsh-systems.
 * Todos os direitos reservados.
 */
package com.wsh.playeronline.persistence.dao;

import java.util.List;

import com.wsh.playeronline.exception.DAOException;

/**
 * Abstract class to the methods default: insert, delete, update and search.
 * 
 * @author Wiltenburg, W. - <a href="wsh.cezar@gmail.com">washington at wshSystems</a>
 * @since 2011, April.
 * @version 1.0.0
 *
 * @param <T> the object
 */
public interface AbstractDAO<T> {

	/**
	 * Responsavel por adicionar.
	 * 
	 * @param t the object
	 * @throws DAOException
	 * 			caso ocorra algo.
	 */
	void adicionar(T t) throws DAOException;
	
	/**
	 * Responsavel por alterar.
	 * 
	 * @param t the object
	 * @throws DAOException
	 * 			caso ocorra algo.
	 */
	void alterar(T t) throws DAOException;
	
	/**
	 * Responsavel por remover. 
	 * 
	 * @param t the object
	 * @throws DAOException
	 * 			caso ocorra algo.
	 */
	void remover(T t) throws DAOException;
	
	/**
	 * Responsavel por deletar.
	 * 
	 * @param t the object
	 * @throws DAOException
	 * 			caso ocorra algo.
	 */
	void deletar(T t) throws DAOException;
	
	/**
	 * Responsavel por buscar.
	 * 
	 * @param codigo codigo
	 * @return T the object
	 * @throws DAOException
	 * 			caso ocorra algo.
	 */
	T buscar(Long codigo) throws DAOException;
	
	/**
	 * Responsavel por listar.
	 *  
	 * @return List<T>
	 * @throws DAOException
	 * 			caso ocorra algo.
	 */
	List<T> listar() throws DAOException;	
}